home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / mac / 00000000 / 06000000 / Shared.dir / 00910_Script_910 < prev    next >
Text File  |  1995-11-17  |  7KB  |  261 lines

  1. -- Handler to switch to zoomed screen from
  2. -- main screen.
  3.  
  4. on clickOnSmallPict
  5.   
  6.   put the frameLabel into jumpToLabel
  7.   sound playFile 1, "Click.aif"
  8.   set the visibility of sprite 5 to false -- picture
  9.   set the visibility of sprite 6 to false -- caption
  10.   
  11.   set the visibility of sprite 36 to false -- slider
  12.   set the visibility of sprite 37 to false -- slider
  13.   
  14.   go label (jumpToLabel&"z") - 1
  15.   updatestage
  16.   go label (jumpToLabel&"z")
  17.   put the castNum of sprite 6 into theCast
  18.   
  19.   set the forecolor of cast theCast to 0
  20.   set the backcolor of cast theCast to 255
  21.   set the visibility of sprite 5 to true -- picture
  22.   set the visibility of sprite 6 to true -- caption
  23.   
  24. end clickOnSmallPict
  25.  
  26. ----------------------------------------------
  27. -- Handler to switch back to main screen from
  28. -- zoomed screen.
  29.  
  30. on clickOnBigPict
  31.   
  32.   put the frameLabel into theLabel
  33.   put the number of chars in theLabel into theChars
  34.   put char 1 to ( theChars - 1)  of theLabel into jumpToLabel
  35.   
  36.   
  37.   sound playFile 1, "Click.aif"
  38.   puppetSprite 5, false
  39.   puppetSprite 6, false
  40.   go the frame - 1
  41.   --puppetPalette 924 -- change to mac system palette
  42.   --puppetPalette 0 -- turn off puppeting
  43.   go frame jumpToLabel
  44.   set the visibility of sprite 6 to true
  45.   set the visibility of sprite 36 to true
  46.   set the visibility of sprite 37 to true
  47.   
  48. end clickOnBigPict
  49. ----------------------------------------------
  50. -- Handler to stick the zoomed pict to the mouse
  51.  
  52. on moveBigPict
  53.   
  54.   cursor 200
  55.   put the clickOn into whichSprite
  56.   puppetSprite whichSprite, true
  57.   
  58.   put the locH of sprite whichSprite - the mouseH into Hdiff
  59.   put the locV of sprite whichSprite - the mouseV into Vdiff
  60.   repeat while the stillDown
  61.     set the locH of sprite whichSprite to the mouseH + Hdiff
  62.     set the locV of sprite whichSprite to the mouseV + Vdiff
  63.     updateStage
  64.   end repeat
  65.   
  66.   
  67.   cursor -1
  68.   
  69. end moveBigPict
  70.  
  71. ----------------------------------------------
  72. -- handler to switch the big caption on or off
  73.  
  74. on captionSwitch
  75.   
  76.   if the visibility of sprite 6 = 1 then
  77.     set the visibility of sprite 6 = 0
  78.   else
  79.     set the visibility of sprite 6 = 1
  80.   end if
  81. end captionSwitch
  82.  
  83. ---------------------------------------------------------------
  84. -- When a word in the tools
  85. -- menu is rooled on it flashes red and if it is clicked
  86. -- then the script in quotes is executed. Here the script
  87. -- should be a call to open a MIAW.
  88.  
  89. on toolsDrop
  90.   
  91.   if rollOver(17) = true then
  92.     flashButton 17, "openSearch"
  93.     
  94.   else if rollOver(18) = true then
  95.     flashButton 18, "openNotes"
  96.     
  97.   else if rollOver(19) = true then
  98.     flashButton 19, "openBookmarks"
  99.     
  100.   else if rollOver(20) = true then
  101.     flashButton 20, "wait 10"
  102.     
  103.   end if
  104.   
  105. end toolsDrop
  106. ------------------------------------------
  107. -- This handler is called when the tools button is pressed.
  108. -- It puts the frame it is called from into a global variable
  109. -- so that it can remember to return to the same spot.
  110. -- The channels containing text, diagrams, and active buttons,
  111. -- are puppeted to freeze them while the menu is down in the
  112. -- frame "menu".
  113.  
  114. on toolsScript
  115.   
  116.   global jumpFrame
  117.   
  118.   put the frame into jumpFrame
  119.   puppetsOn
  120.   go frame "tools"
  121.   
  122. end toolsScript
  123. ------------------------------------------
  124. -- Handler to open the MIAW for searching topics.
  125.  
  126. on openSearch
  127.   
  128.   global hardDisk
  129.   
  130.   -- Define Window boundaries
  131.   set theTop = the stageTop + 140
  132.   set theLeft = the stageLeft + 56
  133.   set theBottom = theTop + 200
  134.   set theRight = theLeft + 528
  135.   
  136.   put  hardDisk & "Search.dir" into childWindow
  137.   set the rect of window childWindow = rect(theLeft,theTop,theRight,theBottom)
  138.   set the title of window childWindow to "Search"
  139.   set the windowType of window childWindow to 4
  140.   --set the modal of window childWindow to true
  141.   open window childWindow
  142.   
  143. end openSearch
  144. ------------------------------------------
  145. -- Handler to open the MIAW for making notes.
  146.  
  147. on openNotes
  148.   
  149.   global hardDisk
  150.   
  151.   -- Define Window boundaries
  152.   set theTop = the stageTop + 70
  153.   set theLeft = the stageLeft + 25
  154.   set theBottom = theTop + 368
  155.   set theRight = theLeft + 256
  156.   
  157.   put  hardDisk & "Notes.dir" into childWindow
  158.   set the rect of window childWindow = rect(theLeft,theTop,theRight,theBottom)
  159.   set the windowType of window childWindow to 4
  160.   --set the modal of window childWindow to TRUE
  161.   set the title of window childWindow to "Notes"
  162.   open window childWindow
  163.   
  164. end openNotes
  165. ------------------------------------------
  166. -- Handler to open the MIAW for making bookmarks.
  167.  
  168. on openBookmarks
  169.   
  170.   global hardDisk
  171.   
  172.   -- Define Window boundaries
  173.   set theTop = the stageTop + 140
  174.   set theLeft = the stageLeft + 112
  175.   set theBottom = theTop + 200
  176.   set theRight = theLeft + 416
  177.   
  178.   put  hardDisk & "Bookmark.dir" into childWindow
  179.   set the rect of window childWindow = rect(theLeft,theTop,theRight,theBottom)
  180.   set the title of window childWindow to "Bookmarks"
  181.   open window childWindow
  182.   
  183. end openBookmarks
  184. ------------------------------------------
  185. -- Handler called when bottom left buttons are clicked
  186. -- or slidebox button. A specific handler is called
  187. -- appropriate to the function.
  188.  
  189. on navButtCheck
  190.   put the clickOn into whichSprite
  191.   
  192.   if the clickOn = 31 then
  193.     goUpLevel
  194.     
  195.   else if the clickOn = 32 then
  196.     goBackOne
  197.     
  198.   else if the clickOn = 34 then
  199.     goSlideBox
  200.     
  201.   else if the clickOn = 35 then
  202.     goSlideCopy
  203.     
  204.   else if the clickOn = 38 then
  205.     quitScript
  206.     
  207.   end if
  208.   
  209. end navButtCheck
  210. ------------------------------------------
  211. on goUpLevel
  212.   
  213.   global CDDrive, gSep
  214.   
  215.   go movie CDDrive & "00000000" & gSep & "00000000.dir"
  216.   
  217. end goUpLevel
  218. ------------------------------------------
  219. on goBackOne
  220.   global hardDisk
  221.   
  222.   put hardDisk & "History.dir" into childWindow
  223.   if the visible of window childWindow = true then
  224.     set the visible of window childWindow = false
  225.     set the modal of window childWindow to false
  226.   else
  227.     set the windowType of window childWindow = 4
  228.     set the visible of window childWindow = true
  229.     set the modal of window childWindow to true
  230.   end if
  231.   
  232.   
  233. end goBackOne
  234. ------------------------------------------
  235. on goSlideCopy
  236.   
  237.   copySlide
  238.   
  239. end goSlideCopy
  240. -----------------------------------------------
  241. -----------------------------------------------
  242. -- Handler called from Q button to quit from the CD
  243.  
  244. on quitScript
  245.   
  246.   global hardDisk
  247.   
  248.   -- Define Window boundaries
  249.   set theTop = the stageTop + 140
  250.   set theLeft = the stageLeft + 178
  251.   set theBottom = theTop + 200
  252.   set theRight = theLeft + 304
  253.   
  254.   put  hardDisk & "Quit.dir" into childWindow
  255.   set the rect of window childWindow = rect(theLeft,theTop,theRight,theBottom)
  256.   set the windowType of window childWindow to 2
  257.   
  258.   open window childwindow
  259.   
  260. end quitScript
  261.